C-style definitions should not be made inside Objective-C structures such as @interface
s. Doing so appears to limit their scope to the
interface, but in fact, it imposes no such restriction. Such symbols are available globally, and may result in future confusion. Instead, such
definitions should be moved to the top level, to make it clear that they’re globally available.
Noncompliant code example
@interface Example : NSObject
typedef int T; // Noncompliant - defines type, which is visible outside of @interface
void fun(); // Noncompliant - declares global function
@end
Compliant solution
typedef int T;
void fun();
@interface Example : NSObject
@end